﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.Common.IDao
{
    public interface IUpdateDaoAsync<T> : IDataCoreAccessObjectAsync where T : class, new()
    {
        Task<int> UpdateAsync(T t);
        Task<int> UpdateAsync(T t, object id);
        Task<int> UpdateAsync(Expression<Func<T, bool>> where, Dictionary<string, object> dic);

        Task<int> UpdateAsync<TEntity>(TEntity t) where TEntity : class, new();
        Task<int> UpdateAsync<TEntity>(TEntity t, object id) where TEntity : class, new();
        Task<int> UpdateAsync<TEntity>(Expression<Func<TEntity, bool>> where, Dictionary<string, object> dic) where TEntity : class, new();
    }
}
